<?php
function leError($message, $jumpUrl = '', $time = 2000){//PHP直接调用layermsg
    $w = '150px';
    $h = '300px';
    echo '<script type="text/javascript" src="js/jquery.js"></script>';
    echo '<script type="text/javascript" src="js/layer.js"></script>';
    if($jumpUrl != ''){
        echo '<script>$(document).ready(function(){layer.msg("'.$message.'");setTimeout(function(){window.location.href="'.$jumpUrl.'";},'.$time.')});</script>';
    }else{
        echo '<script>$(document).ready(function(){layer.msg("'.$message.'",{icon:2,time:1000000,offset:["'.$w.'","'.$h .'"]} ) });</script>';
    }
}
?>